package com.yang.service.impl;

import com.yang.mapper.UserMapper;
import com.yang.pojo.User;
import com.yang.pojo.User_Info;
import com.yang.service.UserService;

import java.sql.Timestamp;
import java.util.Date;

public class UserServiceImpl implements UserService {
    private UserMapper userMapper;

    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    @Override
    public int addUser(User user) {
        return userMapper.addUser(user);
    }

    @Override
    public User inspectLoginUser(String username,String password) {
        return userMapper.inspectLoginUser(username,password);
    }

    @Override
    public void insertUserLoginTime(User userObject) {
        userMapper.insertUserLoginTime(userObject);
    }

    @Override
    public void exitLogin(String username) {
        userMapper.exitLogin(username);
    }

    @Override
    public int saveUserInfo(User_Info userInfo) {
        return userMapper.saveUserInfo(userInfo);
    }

    @Override
    public User_Info getUserInfo(String username) {
        return userMapper.getUserInfo(username);
    }

    @Override
    public int updateUserInfo(User_Info userInfo) {
        return userMapper.updateUserInfo(userInfo);
    }

    @Override
    public void uploadUserImg(User_Info userInfo) {
        userMapper.uploadUserImg(userInfo);
    }
}
